﻿using B.S.Domain.审计字段;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.S.Domain.BasicData.MaterialManagement.BOM
{
    /// <summary>
    /// BOM表
    /// </summary>
    public class BOM:BaseModel
    {
        public int BomId { get; set; }
        /// <summary>
        /// BOM编码(产品物料表)
        /// </summary>
        public string Materialcode { get; set; }
        /// <summary>
        /// BOM名称(产品物料表)
        /// </summary>
        public  string Bname { get; set; }
        /// <summary>
        /// 版本
        /// </summary>
        public  decimal version { get; set; }
        /// <summary>
        /// 用量
        /// </summary>
        public int UseNum { get; set; }
        /// <summary>
        /// BOM 描述
        /// </summary>
        public string describe { get; set; }
        /// <summary>
        /// 父级编号
        /// </summary>
        public int? ParentId { get; set; }
        /// <summary>
        /// 阶别
        /// </summary>
        public int LevelId { get; set; } = 1;
        /// <summary>
        /// 是否为叶子节点
        /// </summary>
        public bool IsLeaf { get; set; } = true;
        /// <summary>
        /// 子级BOM列表（导航属性）
        /// </summary>
        public virtual ICollection<BOM> Children { get; set; } = new List<BOM>();
        /// <summary>
        /// 父级BOM（导航属性）
        /// </summary>
        public virtual BOM Parent { get; set; }

      
    }
}
